package Practice06;

public class Machine {
    public void checkBag(Goods good) throws DangerException {
        if (good.isDanger()) {
                throw new DangerException();

        }
    }
}